function main() {
    let canvas = document.getElementById('example');
    if (!canvas) {
        console.log('Failed to retrieve the <canvas> element');
        return false;
    }

    /**绘图上下文 */
    let ctx = canvas.getContext('2d');

    /**设置填充颜色 */
    ctx.fillStyle = 'rgba(0, 0, 255, 1.0)';
    /**画一个矩形 */
    ctx.fillRect(120, 10, 150, 150);
}